package javacore.objects.test3;

class President {
	String name;
	
	static President president;
	
	private President(String n){
		name = n;
	}
	
	static President getPresident(String name){
		if (president == null) {
			president = new President(name);
		}
		
		return president;
	}
	
	void sayHello(){
		System.out.println("Hello " + name);
	}
}